package main

import (
	"fmt"
	"math"
)

type Rec struct {
	w, h int
}

type Circle struct {
	r int
}

func area(rec Rec) int {
	return rec.h * rec.w
}

func (cir *Circle) area() int {
	area := int(math.Pi * float64(cir.r*cir.r))
	cir.r = 2
	return area
}

type Clinder struct {
	Circle
	h int
}

func (clinder Clinder) v() int {
	return clinder.area() * clinder.h
}

func main() {
	fmt.Println("start!")

	rec := Rec{1, 2}
	fmt.Println("s = ", area(rec))

	cir := Circle{1}
	fmt.Println("cir = ", cir.area())
	fmt.Println("cir = ", cir.area())

	clinder := Clinder{Circle{1}, 2}
	fmt.Println("clinder = ", clinder.v())
}
